path addition algorithm

un. 路径相加算法